FROM python:3.6.15

RUN apt update -y && apt install -y openssh-server && apt install -y openssh-server sshpass
RUN echo 'root:root' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/UsePAM yes/UsePAM no/'                                   /etc/ssh/sshd_config
RUN echo "service ssh start && tail -f /dev/null" >> /start_script.sh
RUN chmod 777 /start_script.sh

ENTRYPOINT ["/bin/bash", "/start_script.sh"]

EXPOSE 22
